package cn.pconline.autoclub.util.dyna;

import java.util.Date;

/**
 * 帖子动态辅助类
 *
 * @author <a href="mailto:chensy0203@163.com">chensy</a>
 */
public class TopicDyna extends AbstractDyna {

    private long provinceId;    //省份ID
    private long cityId;    //城市ID
    private long forumId;   //论坛版块ID
    private String forumName;   //论坛版块名称
    private long userId;    //发帖者ID
    private long topicId;   //论坛帖子ID            
    private String topicTitle;  //论坛帖子标题
    private String message; //论坛帖子内容（限140字符）
    private long lastPostBy;    //论坛帖子最后回复人
    private int petrol;   //油值
    private int pick;   //论坛帖子精华类型, 0不是精华，1为精华1,2为精华2
    private int recommend;  //论坛帖子推荐类型，0不是推荐，1是推荐
    private Date lastPostAt; //论坛最后回复时间
    private int postCount;   //帖子回复数
    private String lastPostName;
    private String type;//question是问答帖，空为普通帖
    private String appTitle;	//新增title字段，用于app

    public boolean isQuestionTopic() {
        return "question".equals(type);
    }

    /**
     * 跟messge一样
     *
     * @return
     */
    @Override
    public String getContent() {
        return message;
    }

    /**
     * 跟messge一样
     *
     * @param content
     */
    @Override
    public void setContent(String content) {
        this.message = content;
    }

    /**
     * 同userId
     *
     * @return
     */
    @Override
    public long getCreateBy() {
        return userId;
    }

    /**
     * 同userId
     *
     * @param createBy
     */
    @Override
    public void setCreateBy(long createBy) {
        this.userId = createBy;
    }

    public long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(long provinceId) {
        this.provinceId = provinceId;
    }

    public long getCityId() {
        return cityId;
    }

    public void setCityId(long cityId) {
        this.cityId = cityId;
    }
    
    public long getForumId() {
        return forumId;
    }

    public void setForumId(long forumId) {
        this.forumId = forumId;
    }

    public String getForumName() {
        return forumName;
    }

    public void setForumName(String forumName) {
        this.forumName = forumName;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getTopicId() {
        return topicId;
    }

    /**
     * 同时设置targetId
     * @param topicId 
     */
    public void setTopicId(long topicId) {
        targetId = topicId;
        this.topicId = topicId;
    }

    public String getTopicTitle() {
        return topicTitle;
    }

    public void setTopicTitle(String topicTitle) {
        this.topicTitle = topicTitle;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public long getLastPostBy() {
        return lastPostBy;
    }

    public void setLastPostBy(long lastPostBy) {
        this.lastPostBy = lastPostBy;
    }

    public int getPetrol() {
        return petrol;
    }

    public void setPetrol(int petrol) {
        this.petrol = petrol;
    }

    public int getPick() {
        return pick;
    }

    public void setPick(int pick) {
        this.pick = pick;
    }

    public int getRecommend() {
        return recommend;
    }

    public void setRecommend(int recommend) {
        this.recommend = recommend;
    }

    public Date getLastPostAt() {
        return lastPostAt;
    }

    public void setLastPostAt(Date lastPostAt) {
        this.lastPostAt = lastPostAt;
    }

    public int getPostCount() {
        return postCount;
    }

    public void setPostCount(int postCount) {
        this.postCount = postCount;
    }

    public String getLastPostName() {
        return lastPostName;
    }

    public void setLastPostName(String lastPostName) {
        this.lastPostName = lastPostName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

	public String getAppTitle() {
		return appTitle;
	}

	public void setAppTitle(String appTitle) {
		this.appTitle = appTitle;
	}
    
    
}
